﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdminGroupsAdd.aspx.cs"
    Inherits="Golf.WebUI.AdminShow.SystemManagement.AdminGroupsAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>用户管理组表</title>
    <link href="../Style/tablelist.css" rel="stylesheet" type="text/css" />

    <script src="../../Script/jquery/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {
            $("#btnSave").click(function() {
                var txtGroupName = $("#txtGroupName").val();
                var txtGroupIntro = $("#txtGroupIntro").val();
                var txtPowerIdList = $("#txtPowerIdList").val();
                var txtAddTime = $("#txtAddTime").val();
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded",
                    url: "../Ajax/SystemManagement.aspx?" + Math.random(),
                    data: {
                        "action": "AdminGroupsAdd",
                        "txtGroupName": escape(txtGroupName),
                        "txtGroupIntro": escape(txtGroupIntro),
                        "txtPowerIdList": escape(txtPowerIdList),
                        "txtAddTime": escape(txtAddTime)
                    },
                    success: function(msg) {
                        if (msg == '0') {
                            alert("添加成功！");
                            //刷新框架
                            //window.parent.frames.main.location.reload();
                        }
                        if (msg == '1') {
                            alert("添加失败！");
                        }
                    },
                    error: function(xhr) {
                        alert(xhr.responseText);
                    }
                });
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table class="table">
        <tr>
            <td height="25" width="30%" align="right">
                管理组名称 ：
            </td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtGroupName" runat="server" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td height="25" width="30%" align="right">
                管理组描述 ：
            </td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtGroupIntro" runat="server" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td height="25" width="30%" align="right">
                功能模块ID 多个用 分开 ：
            </td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtPowerIdList" runat="server" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td height="25" width="30%" align="right">
                添加时间 ：
            </td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtAddTime" runat="server" Width="150px"  Style="background: url(../../script/My97DatePicker/skin/datePicker.gif) no-repeat right;" onfocus="WdatePicker({isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd'})"  ></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" valign="bottom" colspan="2">
                <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btn"></asp:Button>
                <asp:Button ID="btnCancle" runat="server" Text="取消" CssClass="btn"></asp:Button>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
